cmake_minimum_required (VERSION 2.6) 
project (STRINGCOVER)

list(APPEND CMAKE_MODULE_PATH .) 

IF(NOT CMAKE_BUILD_TYPE)
	SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: Debug Release" FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)

enable_testing()

find_package(Boost COMPONENTS unit_test_framework program_options REQUIRED)

set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wextra -pedantic -Wno-long-long -Wno-unknown-pragmas -g -ggdb -O0 -DDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -Wextra -pedantic -Wno-long-long -Wno-unknown-pragmas -O3")

add_subdirectory(src)
add_subdirectory(tests)

add_custom_target(doc doxygen Doxyfile)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS tests)